package com.yl.auth.controller;


import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yl.auth.entity.Biaodan;
import com.yl.auth.service.BiaodanService;
import com.yl.common.result.Result;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author ln
 * @since 2023-06-29
 */
@RestController
@RequestMapping("/admin/auth/biaodan")
@Api(tags = "基础设置-表单组件")
public class BiaodanController {
    @Resource
    private BiaodanService biaodanService;
    @ApiOperation(value = "查询表单信息+分页+模糊")
    @GetMapping("/findallbiaodan/{page}/{limit}")
    public Result findallbiaodan(@PathVariable @ApiParam("当前页") Integer page, @PathVariable @ApiParam("总条数") Integer limit, @ApiParam("表单对象") Biaodan biaodan){
        Page<Biaodan> page1=new Page<>(page,limit);
        List<Biaodan> list=biaodanService.findAll(page1,biaodan);
        return Result.ok(list);
    }
}

